<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <th:block th:include="common.html :: source"></th:block>
</head>
<body>

<th:block th:include="common.html :: header"></th:block>

<div class="i_bg bg_color">
    <div class="m_content">

        <div class="m_left">
            <div class="left_n">管理中心</div>
            <div class="left_m">
                <div class="left_m_t t_bg1">订单中心</div>
                <ul>
                    <li><a href="/orderList">我的订单</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg2">会员中心</div>
                <ul>
                    <li><a href="#">用户信息</a></li>
                    <li><a href="/userAddressList">地址管理</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg1">积分中心</div>
                <ul>
                    <li><a href="/integralList">我的积分</a></li>
                </ul>
            </div>
            <div class="left_m">
                <div class="left_m_t t_bg2">后台管理</div>
                <ul>
                    <li>
                        <input id="userType" type="hidden" th:value="${session.user.type}">
                        <a href="javascript:void(0)" onclick="toBack()">后台信息</a>
                    </li>
                </ul>
                <script type="text/javascript">
                    function toBack() {
                        let userType = $("#userType").val();
                        if (userType === 'false') {
                            alert("权限不足，请联系管理员！");
                            return false;
                        }
                        window.location.href = "/back/main";
                    }
                </script>
            </div>
        </div>

        <div class="m_right" id="content">
            <a href="/user/userUpdatePage"
               style="float: right;font-size: 16px;color: red;margin-right: 20px;margin-top: 20px;">修改</a>
            <div class="m_des">
                <table border="0" style="width:870px; line-height:22px;" cellspacing="0" cellpadding="0">
                    <tr valign="top">
                        <td width="115"><img th:src="'/images/touxiang/'+${userinfo.fileName}" width="90" height="90"/>
                        </td>
                        <td>
                            <div class="m_user" th:text="${userinfo.userName}"></div>
                            <br/>
                            <p>
                                性别:
                                <span th:if="${userinfo.gender} == 0">女</span>
                                <span th:if="${userinfo.gender} == 1">男</span>
                                <br/><br/>
                                邮箱:
                                <span th:text="${userinfo.email}"></span><br/><br/>
                                电话:
                                <span th:text="${userinfo.mobile}"></span><br/><br/>
                            </p>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
</div>

<th:block th:include="common.html :: footer"></th:block>
<th:block th:include="common.html :: permit"></th:block>

</body>
</html>